<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Pulldown Avisynth Filter</title>
<link rel="stylesheet" type="text/css" href="../../avisynth.css">
</head>
<body >
<h2><a name="Pulldown"></a>Pulldown</h2>
<p><code>Pulldown </code>(<var>clip, int a, int b</var>)</p>
<p>The <code>Pulldown</code> filter simply selects two out of every five frames of
the source video. The frame rate is reduced to two-fifths of its original value.<br>
  For example, <code>Pulldown</code>(0,2) selects frames 0, 2, 5, 7, 10, 12, and so
on.
</p>
<p>This filter is designed to be used after <code><a href="doubleweave.htm">DoubleWeave</a></code>, and its purpose
is to recover the original frames of a movie that was converted to video using
the 3:2 pulldown process.
</p>
<p>The reason you need to use <code><a href="doubleweave.htm">DoubleWeave</a></code>
first is that capture cards
combine fields in the wrong way. In terms of fields, the 3:2 pulldown sequence
is simply "A A B B B C C D D D ...", where "A" through "D" represent the original
film frames. But the capture cards combine the fields into frames with no respect
for the pulldown pattern, and you get this:
</p>
<pre>A   B   C   D   D       (30fps)
A   B   B   C   D
</pre>
<p>In this pattern frame C is never shown by itself. After <code><a href="doubleweave.htm">DoubleWeave</a></code>
every pair of fields gets its own frame, so the video stream will begin like
this:
</p>
<pre>A A B B C C D D D       (60fps)
A B B B B C C D D
*     *   *     *
</pre>
<p>Now each movie frame has at least one video frame to itself. At this point
the <code>Pulldown</code> filter with arguments of <tt><code>0,3</code></tt> will select the
frames marked with a <tt>*</tt>, and you'll get
</p>
<pre>A     B   C     D       (24fps)
A     B   C     D
</pre>
<p>... which is what you really want.
</p><p>This is all very complicated to describe, but in practice undoing the pulldown
is just a matter of inserting some boilerplate code. See the example below under
<tt><code><a href="showfive.htm">ShowFiveVersions</a></code></tt>.
</p>
<p><code>Pulldown</code>(<i>a</i><tt>,</tt><i>b</i><tt>)</tt> is implemented internally
as <code> <a href="selectevery.htm">SelectEvery</a>(5,<i>a</i><tt>,</tt><i>b</i>).<a href="assumeframefield.htm">AssumeFrameBased</a></code>.
</p>
<p><kbd>$Date: 2005/10/03 16:49:04 $</kbd></p>
<FORM>
<INPUT TYPE="Button" VALUE="Back"
onClick="history.go(-1)">
</form>
</body>
</html>
